From b0659229d3a76bb41effd35061f34a837d9da50a Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Fri, 15 Sep 2023 09:45:58 +0200 Subject: [PATCH] [PATCH] Don't crash if KMountPoint gives nothing back while checking for CIFS BUG: 474451 Gbp-Pq: Name upstream_48322f44_fix_crash_when_kmountpoint_gives_nothing_on_cifs.patch --- src/ioslaves/file/file_unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp index 58017c2..9b4c161 100644 --- a/src/ioslaves/file/file_unix.cpp +++ b/src/ioslaves/file/file_unix.cpp @@ -328,6 +328,9 @@ inline static time_t stat_mtime(const QT_STATBUF &buf) static bool isOnCifsMount(const QString &filePath) { const auto mount = KMountPoint::currentMountPoints().findByPath(filePath); + if (!mount) { + return false; + } return mount->mountType() == QStringLiteral("cifs") || mount->mountType() == QStringLiteral("smb3"); } -- 2.30.2